<!--
    THIS EXAMPLE WAS DOWNLOADED FROM https://echarts.apache.org/examples/zh/editor.html?c=bar-simple
-->
<!DOCTYPE html>
<html style="height: 100%">

<head>
    <meta charset="utf-8">
</head>

<body style="height: 100%; margin: 0">
    <div id="container" style="height: 100%"></div>

    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
    <!-- Uncomment this line if you want to dataTool extension
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/dist/extension/dataTool.min.js"></script>
        -->
    <!-- Uncomment this line if you want to use gl extension
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-gl@2/dist/echarts-gl.min.js"></script>
        -->
    <!-- Uncomment this line if you want to echarts-stat extension
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-stat@latest/dist/ecStat.min.js"></script>
        -->
    <!-- Uncomment this line if you want to use map
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/map/js/china.js"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/map/js/world.js"></script>
        -->
    <!-- Uncomment these two lines if you want to use bmap extension
        <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=<Your Key Here>"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/dist/extension/bmap.min.js"></script>
        -->

    <script type="text/javascript">
        var dom = document.getElementById("container");
        var myChart = echarts.init(dom);
        var app = {};

        var option;

        option = {
            backgroundColor: "#05224d",


            tooltip: {},
            grid: {
                top: '1%',
                left: '1%',
                right: '1%',
                bottom: '1%',
                containLabel: true, //防止溢出
            },
            legend: {
                data: ['走读', '住校'],
                bottom: '1%',
                itemWidth: 12,
                itemHeight: 12,
                textStyle: {
                    color: '#fff'
                },

            },
            radar: {
                radius: '60%',
                splitNumber: 8,
                axisLine: {
                    lineStyle: {
                        color: '#fff',
                        opacity: .1
                    }
                },
                splitLine: {
                    lineStyle: {
                        color: '#fff',
                        opacity: .1
                    }
                },
                splitArea: {
                    areaStyle: {
                        color: 'rgba(255,255,255,.1)',
                        opacity: 1,
                        shadowBlur: 45,
                        shadowColor: 'rgba(0,0,0,.5)',
                        shadowOffsetX: 0,
                        shadowOffsetY: 15,
                    }
                },
                indicator: [{
                    name: '1978',
                    max: 60 //指示器的最大值，可选，建议设置
                }, {
                    name: '1997',
                    max: 160
                }, {
                    name: '1998',
                    max: 300
                }, {
                    name: '1999',
                    max: 350
                }, {
                    name: '2000',
                    max: 500
                }, {
                    name: '2001',
                    max: 250
                }, {
                    name: '2002',
                    max: 350
                }, {
                    name: '2003',
                    max: 500
                }, {
                    name: '2004',
                    max: 250,
                }, {
                    name: '2005',
                    max: 250
                }, {
                    name: '2006',
                    max: 350
                }, {
                    name: '2007',
                    max: 500
                }, {
                    name: '2011',
                    max: 250
                }]
            },

            series: [{
                name: '走读vs住校',
                type: 'radar',
                symbolSize: 0,
                areaStyle: {
                    normal: {
                        shadowBlur: 13,
                        shadowColor: 'rgba(0,0,0,0.1)',
                        shadowOffsetX: 0,
                        shadowOffsetY: 10,
                        opacity: 1
                    }
                },

                data: [{
                    value: [40, 70, 72, 71, 75, 74, 91, 85, 83, 86, 81, 75, 84],
                    name: '住校',
                }, {
                    value: [35, 80, 60, 85, 70, 70, 60, 80, 80, 86, 71, 60, 70],
                    name: '走读',
                }]
            }],
            color: [
                new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                    offset: 0,
                    color: '#4c66ff'
                }, {
                    offset: 1,
                    color: '#5485e2'
                }], false),
                new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                    offset: 0,
                    color: '#3ec2ff'
                }, {
                    offset: 1,
                    color: '#4172ff'
                }], false)
            ],
        };
        if (option && typeof option === 'object') {
            myChart.setOption(option);
        }
        window.addEventListener('resize', function() {
            myChart.resize()
        })
    </script>
</body>

</html>